home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / 3dlib15.zip / 3DLIB.DOC < prev    next >
Text File  |  1992-10-27  |  16KB  |  314 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. *                                    3dLIB                                    *
  13. * 3dLIB - 3D Graphic objects library for Turbo-Pascal Programmers. V1.5       *
  14. * Last Update : Oct. 13, 1992.                                                *
  15. *******************************************************************************
  16.  
  17.                                  FILE - LIST
  18.                                  -----------
  19.  
  20.   The distribution file 3DLIB12 contains the following files :
  21.  
  22.         *     .PAS      - Pascal sources :
  23.                           CTM3D   .PAS - Current Transformation Matrix definition.
  24.                           CTM3DW  .PAS - Same as above for Windows.
  25.                           PROJECT3.PAS - Projection (3D -> 2D) unit.
  26.                           PROJECTW.PAS - Same as above for Windows.
  27.                           HDR3D   .PAS - Header to 3D structures.
  28.                           HDR3DW  .PAS - Same as above for Windows.
  29.                           RTOBJ   .PAS - 3D Wire-Mesh objects.
  30.                           RTOBJW  .PAS - Same as above for Windows.
  31.                           DEMO3D  .PAS - A demo program - Dos.
  32.                           DEMO3DW .PAS - A demo program - Windows.
  33.         *     .TPU      - Complied Units.
  34.         *     .3D2      - Demo OBJ3D Type object files :
  35.                           3       .3D2 - A 3 dimensional "3" character.
  36.                           BOX     .3D2 - A 3D box.
  37.                           D       .3D2 - A 3 dimensional "d" character.
  38.                           PROP    .3D2 - A 3D Propeller.
  39.                           PYR     .3D2 - A Pyramid.
  40.                           SUPROP  .3D2 - Another 3D Propeller.
  41.                           TRAP    .3D2 - A 3D Trapeze.
  42.         *     .3DS      - Demo ComplexObj type object files.
  43.         3DLIB .DOC      - This file.
  44.         3DC   .EXE      - M3D to PAS source file translator.
  45.         3DCW  .EXE      - Windows Hosted M3D to PAS generator.
  46.         3DC   .DOC      - 3dC translator documentation.
  47.         3DA   .EXE      - 3dA Macro Animator (Interpreter) for the Dos environment.
  48.         *     .M3D      - Sample macro programs.
  49.         DEMO3D.EXE      - Demo 3d animation program - Dos.
  50.         DEMO3DW.EXE     - Demo 3d animation program - Windows.
  51.         PROGRAMS.TXT    - ISoft D&M shareware products description.
  52.         3DLIB .REG      - 3dLIB registration file.
  53.         3DLIB .RES      - 3dLIB resource file for windows programs.
  54.  
  55.  
  56.                                  Why Register
  57.                                  ------------
  58.  
  59.   3dLIB is a shareware product, if you find this product valuable, 
  60.  please register it. This section describes the reasons you should register.
  61.  
  62.   By registering you will receive a printed manual, with many examples, a 
  63.  diskette with the latest 3dLIB version, and the complete source code for 3dLIB
  64.  based training and example programs, and - you will help us to create the next 
  65.  version of 3dLIB - that will include even more features then the features that 
  66.  are currently available!,  we might even add YOUR enhancement requests!
  67.  
  68.                                  What's  New
  69.                                  -----------
  70.  
  71.   In version 1.5 the 3dC and 3dCW programs generate a getClassName function
  72.  for the generated windows.
  73.  
  74.   Added Animate Command to the 3dCW program, this way macros can be prototyped
  75.  before they are translated into source code.
  76.  
  77.   Version 1.4 adds the 3dA program - an animator for .M3D macro programs,
  78.  in the dos Environment. 
  79.  
  80.   Version 1.4 also adds the Windows Hosted 3dCW program - A macro translator
  81.  that runs in the Windows environment.
  82.  
  83.   This version was tested with Turbo Pascal for Windows V1.5 .
  84.  
  85.   Version 1.3 adds the 3dLIB.RES resource file for use in Windows programs 
  86.  generated by the 3DC program.
  87.  
  88.   3dC generated programs include a menu that allows them to be re-animated and
  89.  closed.
  90.  
  91.   Version 1.2 adds support for Turbo Pascal for Windows programmers by including
  92.  a second set of pascal code sources for this compiler. 
  93.  
  94.   The supplied 3dC macro compiler has been enhanced to produce code for both
  95.  compilers, by using a switch on the command line. Please notice - The
  96.  same macro source files can be translated into Turbo Pascal 6.0 and
  97.  Turbo Pascal for Windows code, with no change in the macro definition!
  98.  
  99.   The supplied 3dC macro compiler implemented the z, b and w commands that
  100.  were omitted from version 1.1 because of time constraints.
  101.  
  102.                                  INTRODUCTION
  103.                                  ------------
  104.  
  105.   3dLIB is a library of pascal units that allows Turbo-Pascal programmers to                                 
  106.  write applications that display and animate 3D wire-mesh objects. The 
  107.  library is based on a project developed since 1984 on different platforms.
  108.  
  109.   This package supports both Turbo-Pascal for DOS and Turbo Pascal for Windows.
  110.  
  111.   A package called 3D120 is distributed by ISoft D&M that 
  112.  includes a graphic editor, macro interpreter and pascal translator to
  113.  create and use 3D objects. It is highly recommended that any programmer
  114.  trying to use this library will use the 3D program to create 
  115.  objects, and understand the animation abilities of the library.
  116.  
  117.                                    OBJECTS
  118.                                    -------
  119.   The 3D objects are defined as the following TP object-structures :
  120.   
  121. *******************************************************************************
  122. *                                 BaseObject                                  *
  123. *******************************************************************************
  124.  baseObject - defined in the RTOBJ.PAS file, this is the "dummy"
  125.  ancestor object class of the 3D-objects, such an object has a CTM (called
  126.  myCTM), a color, a center of gravity 3D point (location), and other display
  127.  attributes, in order to achieve better animation results, a scrPntUpdt 
  128.  boolean variable is used to indicate if the screen 2D points of the
  129.  object has to be re-calculated from the 3D representation.                       
  130.   
  131.   The object uses a 4X4 "transformation matrix" to represent itself in the
  132.  3D universe, the move, translate, scale, allScale, rotate, goto3dPos,
  133.  setToOrigin, calcLocation and deleteTransform methods are used to update
  134.  that matrix (the Current Transformation Matrix).
  135.  
  136.   The load, save, writeMe, and readMe methods are used to store and retrieve
  137.  a 3D object from a storage device (a disk..), and the open and close methods
  138.  are used to construct, and destruct the object. The show, hide and paint
  139.  methods display, or erase the object on the 2D screen. One more interesting
  140.  method is the updateScreenPoints method, that transforms the 3D object 
  141.  representation to the 2D screen.
  142.  
  143. *******************************************************************************
  144. *                                    obj3D                                    *
  145. *******************************************************************************
  146.   obj3D is a descendant object of the baseObject class, this is a simple
  147.  wire-mesh object, that is built from an array of maxPoints points (change
  148.  this constant in the HDR3D.PAS file to create bigger, or smaller objects)
  149.  in the 3D universe, an array of maxLines lines (a line is a segment in the
  150.  3D universe that connects 2 3D points), another array holds the 2D screen
  151.  points of the object, calculated from its 3D representation, and the CTM.
  152.  Another interesting aspect of this object is the use of 2 more matrices,
  153.  the reverseRot, and unReverseRot CTM objects, that are used to hold only the
  154.  reverse, and counter reverse of the rotation transformations, these are used
  155.  by complex objects that contain several obj3D objects, where some of them 
  156.  has to be rotated, scaled and translated around an arbitrary point in the
  157.  3D universe, which is not there center of gravity (frame - reference).
  158.  
  159. *******************************************************************************
  160. *                                 complexObj                                  *
  161. *******************************************************************************
  162.   The RTOBJ.PAS file contains the definition of the complexObj 3D object,
  163.  this is an object that contains a maxSubObjects (defined in that file)
  164.  array of simple wire-mesh obj3D objects. This object class sometimes
  165.  referred to as the "super - object", allows the user to create complex 3D
  166.  objects that has a common frame - reference (center of gravity), an example
  167.  of such an object might be a Robot, that has a center of gravity, and is
  168.  built of some sub objects that must be able to be transformed both with the
  169.  frame - reference, and by themselves.
  170.  
  171.   The RTOBJ.PAS (for - RunTime object) unit file contains the definition of
  172.  the baseObj, obj3D and the complexObj classes.
  173.  
  174.  
  175.                                   PROJECTIONS
  176.                                   -----------
  177.  
  178.   The PROJECT3.PAS file contain the code that transforms objects and points
  179.  from the 3D universe, to the 2D coordinates.
  180.  
  181.   Two 3D -> 2D transformations are supported, axonometric projection, and 
  182.  perspective projection. This is a short explanation of the difference
  183.  between these 2 projections :
  184.  
  185.                A : axonometric projections, no perspective due to        
  186.                        distance is performed, the general way            
  187.                        we can look at the coordinate system is as        
  188.                        follows :                                         
  189.                                                                          
  190.                                |  z axis                                 
  191.                                |                                         
  192.                               / \                                        
  193.                     x axis   /   \  y axis                               
  194.                                                                          
  195.                B : perspective projections : the normal eye perspective  
  196.                        projection is performed, we can look at the 3d    
  197.                        universe we are referring to as a cube of          
  198.                        1000 x 1000 x 1000 integer locations, with        
  199.                        the x axis, and y axis parallel to the screen     
  200.                        x, y axis respectively, and the z axis going into  
  201.                        the screen.                                       
  202.                                                                          
  203.                        we will look at the coordinate system as follows :
  204.                                                                          
  205.                        │ Y axis                                          
  206.                        │                                                 
  207.                 Z axis x------ X axis                                    
  208.                                                                          
  209.   These units contain a calcPoint procedure that receives a 3D point, and
  210.  transforms it to a 2D screen coordinate, the setPerspective, 
  211.  resetPerspective and togglePerspective change from perspective projection
  212.  to axonometric projection, and vice versa.
  213.  
  214.                                       CTM
  215.                                       ---  
  216.  
  217.   CTM3D.PAS is the file that defines the current transformation matrix that                                      
  218.  is used to position the 3D objects in the universe. The CTM is a 4x4 matrix
  219.  that is multiplied (from the right) by each point of the 3D object whenever
  220.  a new location is desired for the object. 
  221.  
  222.   This unit defines all the transformations that can be applied and used
  223.  by a CTM, like rotate, scale, translate etc..
  224.  
  225.                                   3D2 FORMAT
  226.                                   ----------
  227.  
  228.   The obj3D object files are files of type real, that has the following
  229.  structure :
  230.  
  231.  1 Real entry : number of 3D points. (We will call in numOfPoints)
  232.  numOfPoints entries that contain the following information :
  233.      1 Real Entry : X location in the 3D universe.
  234.      1 Real Entry : Y location in the 3D universe.
  235.      1 Real Entry : Z location in the 3D universe.
  236.  1 Real Entry : number of lines.  (We will call it numOfLines)
  237.  numOfLines entries that contain the following information :
  238.      1 Real Entry : 3D Point Number of "From" edge of the line.
  239.      1 Real Entry : 3D Point Number of "To" edge of the line.
  240.  
  241.  Please refer to the OBJ3D.README method that deals with reading this 
  242.  3D file format.
  243.  
  244.                                   3DS FORMAT
  245.                                   ----------
  246.  
  247.   The complexObj object files are files of real type that have the
  248.  following structure :
  249.  
  250.  1 Real Entry : Number of subobjects the complexObj contain (We will
  251.                  call it numOfChilds)
  252.  numOfChilds entries that have the same structure as simple 3D2 files.
  253.  
  254.                                    Warranty
  255.                                    --------
  256.  
  257.   There is no warranty what so ever, The program is supplied as is,
  258.  The distributor (ISoft D&M), or the author (Loewy Ron), are not,
  259.  and will not be responsible for any damages, lost profits, 
  260.  or inconveniences caused by the use, or inability to use this package. 
  261.  The use of the package is at your own risk. 
  262.  By using (or attempting to use) the package you agree to this.
  263.  
  264.                                     General
  265.                                     -------
  266.  
  267.   3dLIB is distributed by ISoft D&M, P.O.B. 5517 CORALVILLE IA 52241, U.S.A.
  268.   
  269.   3dLIB is (c) copyrighted by Loewy Ron, 1991, 92.
  270.  
  271.   3dLIB is a shareware package, please register your copy. 
  272.   To register your copy of 3dLIB please refer to the supplied
  273.   3DLIB.REG file. 
  274.  
  275.   Other programs distributed by ISoft D&M are described in the supplied  
  276.   PROGRAMS.TXT file.
  277.  
  278.                                     Contact
  279.                                     -------
  280.  
  281.   Please contact :
  282.  
  283.   ISoft D&M,  
  284.   P.O.B 5517
  285.   Coralville IA 52241,
  286.   U.S.A
  287.  
  288.   To contact the author directly : 
  289.  
  290.   Contact :     Loewy Ron,
  291.                 9 Haneveem st.
  292.                 Herzeliya, 46465
  293.                 ISRAEL.
  294.  
  295.                                     Credits
  296.                                     -------
  297.  
  298.   3dLIB was written using Turbo Pascal V6.0, a copyright of 
  299.   Borland International.
  300.  
  301.   The Windows routines were written using Turbo Pascal V1.0, and
  302.   Turbo Pascal V1.5 for Windows.
  303.  
  304.   Turbo Pascal and Turbo Pascal for Windows are copyrights of
  305.   Borland International.
  306.  
  307.   Windows 3.0 and Windows 3.1 are copyrights of Microsoft Corp.
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.